package Product;

import salary.SalaryVo;

public class Max {
	static java.util.Calendar cal = java.util.Calendar.getInstance();
	int year = cal.get(cal.YEAR);
	SalaryVo sv;

	public int Max() {
		int sum = 0;
		String temp = sv.getSA_sal().replace("만원", "");
		int money = Integer.parseInt(temp);
		sum += money / 300;
		System.out.println(sum + "1번째점수");
		if (sv.getSA_home().equals("Y")) {
			sum += 10;
			System.out.println("2번째점수");
		}
		if (sv.getSA_car().equals("Y")) {
			sum += 3;
			System.out.println("3번째점수");
		}
		if (sv.getSA_marr().equals("Y")) {
			sum += 3;
			System.out.println("4번째점수");
		}
		int HD = Integer.parseInt(sv.getSA_hd().substring(0, 4));
		sum += year - HD - 1;

		System.out.println("5번째점수");
		System.out.println(sum);
		sum = sum * 200;
		return sum;

	}

	public SalaryVo getSv() {
		return sv;
	}

	public void setSv(SalaryVo sv) {
		this.sv = sv;
	}

	public static void main(String args[]) {
		Max m = new Max();
		m.Max();
	}

}
